package com.pet_service.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pet_service.enums.TOrderServiceType;
import com.pet_service.enums.TOrderStatus;
import com.pet_service.enums.TPayStatus;
import lombok.Data;

/**
 * 订单表
 * @TableName orders
 */
@TableName(value ="orders")
@Data
public class Orders extends BaseEntity {
    /**
     * 订单号
     */
    @TableField(value = "order_no")
    private String order_no;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Integer user_id;

    /**
     * 宠物ID
     */
    @TableField(value = "pet_id")
    private Integer pet_id;

    /**
     * 总金额
     */
    @TableField(value = "total_amount")
    private BigDecimal total_amount;

    /**
     * 实付金额
     */
    @TableField(value = "pay_amount")
    private BigDecimal pay_amount;

    /**
     * 订单状态
     */
    @TableField(value = "order_status")
    private TOrderStatus order_status;

    /**
     * 支付方式
     */
    @TableField(value = "pay_type")
    private Integer pay_type;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "pay_time")
    private Date pay_time;

    /**
     * 1-上门；2-寄养
     */
    @TableField(value = "service_type")
    private TOrderServiceType service_type;

    /**
     * 支付流水号
     */
    @TableField(value = "transaction_no")
    private String transaction_no;

    /**
     * 支付状态
     */
    @TableField(value = "pay_status")
    private TPayStatus pay_status;
}